/*
 * FirstView2.java
 *
 * Created on __DATE__, __TIME__
 */

package com.shangpintechnology.sci.machinegenerat;

import java.awt.Color;
import java.awt.Event;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.util.Vector;

import javax.swing.BorderFactory;
import javax.swing.JOptionPane;
import javax.swing.JToggleButton;
import javax.swing.KeyStroke;
import javax.swing.event.ChangeEvent;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;

import com.shangpintechnology.sci.DAO;
import com.shangpintechnology.sci.MainClass;
import com.shangpintechnology.sci.cam.MainFrame;
import com.shangpintechnology.sci.SearchVip;
import com.shangpintechnology.sci.view.ArrangeWaiter;
import com.shangpintechnology.sci.view.View;

/**
 *
 * @author  __USER__
 */
public class FirstView2 extends javax.swing.JFrame {
	private FirstView2 getThis() {
		return this;
	}

	/** Creates new form FirstView2 */
	public FirstView2() {
		initComponents();
	}

	public javax.swing.JMenuItem getSaveMenuItem() {
		return saveMenuItem;
	}

	public JToggleButton getArrangeWaiter() {
		return arrangeWaiter;
	}

	public void setArrangeWaiter(JToggleButton arrangeWaiter) {
		this.arrangeWaiter = arrangeWaiter;
	}

	public void setSaveMenuItem(javax.swing.JMenuItem saveMenuItem) {
		this.saveMenuItem = saveMenuItem;
	}

	public javax.swing.JLabel getJLabelTimeIn() {
		return jLabelTimeIn;
	}

	public void setJLabelTimeIn(javax.swing.JLabel labelTimeIn) {
		jLabelTimeIn = labelTimeIn;
	}

	public javax.swing.JMenuItem getAbout() {
		return about;
	}

	public javax.swing.JMenuItem getSearchVip() {
		return searchVip;
	}

	public void setSearchVip(javax.swing.JMenuItem searchVip) {
		this.searchVip = searchVip;
	}

	public javax.swing.JButton getLock() {
		return Lock;
	}

	public void setLock(javax.swing.JButton lock) {
		Lock = lock;
	}

	public void setAbout(javax.swing.JMenuItem about) {
		this.about = about;
	}

	public javax.swing.JMenuItem getExit() {
		return exit;
	}

	public void setExit(javax.swing.JMenuItem exit) {
		this.exit = exit;
	}

	public javax.swing.JMenuItem getNewUser() {
		return newUser;
	}

	public void setNewUser(javax.swing.JMenuItem newUser) {
		this.newUser = newUser;
	}

	public javax.swing.JMenuItem getReNew() {
		return reNew;
	}

	public void setReNew(javax.swing.JMenuItem reNew) {
		this.reNew = reNew;
	}

	public javax.swing.JLabel getWaiterInfo() {
		return waiterInfo;
	}

	public void setWaiterInfo(javax.swing.JLabel waiterInfo) {
		this.waiterInfo = waiterInfo;
	}

	//GEN-BEGIN:initComponents
	// <editor-fold defaultstate="collapsed" desc="Generated Code">
	private void initComponents() {

		jScrollPane1 = new javax.swing.JScrollPane();
		jTable1 = new javax.swing.JTable();
		jTabbedPane1 = new javax.swing.JTabbedPane();
		tab1 = new javax.swing.JPanel();
		jLabel1 = new javax.swing.JLabel();
		jLabel2 = new javax.swing.JLabel();
		UserName = new javax.swing.JTextField();
		VIPcode = new javax.swing.JTextField();
		standardImage = new javax.swing.JLabel();
		jPanel7 = new javax.swing.JPanel();
		jScrollPane2 = new javax.swing.JScrollPane();
		serviceHistory = new javax.swing.JTable();
		tab2 = new javax.swing.JPanel();
		jLabel3 = new javax.swing.JLabel();
		jLabel4 = new javax.swing.JLabel();
		jLabel5 = new javax.swing.JLabel();
		jLabel6 = new javax.swing.JLabel();
		sex = new javax.swing.JTextField();
		age = new javax.swing.JTextField();
		bankCode = new javax.swing.JTextField();
		uid = new javax.swing.JTextField();
		tab3 = new javax.swing.JPanel();
		tab4 = new javax.swing.JPanel();
		jLabel7 = new javax.swing.JLabel();
		jLabel8 = new javax.swing.JLabel();
		VIPlevel = new javax.swing.JTextField();
		riskStage = new javax.swing.JTextField();
		menuBar = new javax.swing.JMenuBar();
		fileMenu = new javax.swing.JMenu();
		openMenuItem = new javax.swing.JMenuItem();
		saveMenuItem = new javax.swing.JMenuItem();
		saveAsMenuItem = new javax.swing.JMenuItem();
		exitMenuItem = new javax.swing.JMenuItem();
		editMenu = new javax.swing.JMenu();
		cutMenuItem = new javax.swing.JMenuItem();
		copyMenuItem = new javax.swing.JMenuItem();
		pasteMenuItem = new javax.swing.JMenuItem();
		deleteMenuItem = new javax.swing.JMenuItem();
		helpMenu = new javax.swing.JMenu();
		contentsMenuItem = new javax.swing.JMenuItem();
		aboutMenuItem = new javax.swing.JMenuItem();
		menuBar1 = new javax.swing.JMenuBar();
		fileMenu1 = new javax.swing.JMenu();
		openMenuItem1 = new javax.swing.JMenuItem();
		saveMenuItem1 = new javax.swing.JMenuItem();
		saveAsMenuItem1 = new javax.swing.JMenuItem();
		exitMenuItem1 = new javax.swing.JMenuItem();
		editMenu1 = new javax.swing.JMenu();
		cutMenuItem1 = new javax.swing.JMenuItem();
		copyMenuItem1 = new javax.swing.JMenuItem();
		pasteMenuItem1 = new javax.swing.JMenuItem();
		deleteMenuItem1 = new javax.swing.JMenuItem();
		helpMenu1 = new javax.swing.JMenu();
		contentsMenuItem1 = new javax.swing.JMenuItem();
		aboutMenuItem1 = new javax.swing.JMenuItem();
		menuBar2 = new javax.swing.JMenuBar();
		fileMenu2 = new javax.swing.JMenu();
		openMenuItem2 = new javax.swing.JMenuItem();
		saveMenuItem2 = new javax.swing.JMenuItem();
		saveAsMenuItem2 = new javax.swing.JMenuItem();
		exitMenuItem2 = new javax.swing.JMenuItem();
		editMenu2 = new javax.swing.JMenu();
		cutMenuItem2 = new javax.swing.JMenuItem();
		copyMenuItem2 = new javax.swing.JMenuItem();
		pasteMenuItem2 = new javax.swing.JMenuItem();
		deleteMenuItem2 = new javax.swing.JMenuItem();
		helpMenu2 = new javax.swing.JMenu();
		contentsMenuItem2 = new javax.swing.JMenuItem();
		aboutMenuItem2 = new javax.swing.JMenuItem();
		jLabel10 = new javax.swing.JLabel();
		jLabel11 = new javax.swing.JLabel();
		jLabel12 = new javax.swing.JLabel();
		jLabel13 = new javax.swing.JLabel();
		jLabel14 = new javax.swing.JLabel();
		jLabel15 = new javax.swing.JLabel();
		jLabel16 = new javax.swing.JLabel();
		jLabel17 = new javax.swing.JLabel();
		jLabel18 = new javax.swing.JLabel();
		Lock = new javax.swing.JButton();
		waiterInfo = new javax.swing.JLabel();
		arrangeWaiter = new javax.swing.JToggleButton();
		menuBar3 = new javax.swing.JMenuBar();
		fileMenu3 = new javax.swing.JMenu();
		newUser = new javax.swing.JMenuItem();
		reNew = new javax.swing.JMenuItem();
		exit = new javax.swing.JMenuItem();
		editMenu3 = new javax.swing.JMenu();
		searchVip = new javax.swing.JMenuItem();
		copyMenuItemStuffManager = new javax.swing.JMenuItem();
		pasteMenuItem3 = new javax.swing.JMenuItem();
		deleteMenuItem3 = new javax.swing.JMenuItem();
		helpMenu3 = new javax.swing.JMenu();
		contentsMenuItem3 = new javax.swing.JMenuItem();
		about = new javax.swing.JMenuItem();
		jSeparator1 = new javax.swing.JSeparator();
		jTextField1 = new javax.swing.JTextField();
		jLabelTimeIn = new javax.swing.JLabel();
		menuBar4 = new javax.swing.JMenuBar();
		fileMenu4 = new javax.swing.JMenu();
		newUser1 = new javax.swing.JMenuItem();
		reNew1 = new javax.swing.JMenuItem();
		exit1 = new javax.swing.JMenuItem();
		editMenu4 = new javax.swing.JMenu();
		searchVip1 = new javax.swing.JMenuItem();
		copyMenuItemStuffManager1 = new javax.swing.JMenuItem();
		pasteMenuItem4 = new javax.swing.JMenuItem();
		deleteMenuItem4 = new javax.swing.JMenuItem();
		helpMenu4 = new javax.swing.JMenu();
		contentsMenuItem4 = new javax.swing.JMenuItem();
		about1 = new javax.swing.JMenuItem();
		liveImage = new javax.swing.JPanel();
		menuBar5 = new javax.swing.JMenuBar();
		fileMenu5 = new javax.swing.JMenu();
		newUser2 = new javax.swing.JMenuItem();
		reNew2 = new javax.swing.JMenuItem();
		exit2 = new javax.swing.JMenuItem();
		editMenu5 = new javax.swing.JMenu();
		searchVip2 = new javax.swing.JMenuItem();
		copyMenuItemStuffManager2 = new javax.swing.JMenuItem();
		pasteMenuItem5 = new javax.swing.JMenuItem();
		deleteMenuItem5 = new javax.swing.JMenuItem();
		helpMenu5 = new javax.swing.JMenu();
		contentsMenuItem5 = new javax.swing.JMenuItem();
		about2 = new javax.swing.JMenuItem();

		setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
		setLocationByPlatform(true);
		setResizable(false);

		jTable1.setModel(new javax.swing.table.DefaultTableModel(
				new Object[][] { { null, null, null }, { null, null, null },
						{ null, null, null }, { null, null, null },
						{ null, null, null }, { null, null, null },
						{ null, null, null }, { null, null, null },
						{ null, null, null }, { null, null, null },
						{ null, null, null }, { null, null, null },
						{ null, null, null }, { null, null, null },
						{ null, null, null }, { null, null, null },
						{ null, null, null }, { null, null, null },
						{ null, null, null }, { null, null, null } },
				new String[] { "号码", "客户姓名", "等级" }));
		jTable1.addMouseListener(new java.awt.event.MouseAdapter() {
			public void mouseClicked(java.awt.event.MouseEvent evt) {
				jTable1MouseClicked(evt);
			}
		});
		jScrollPane1.setViewportView(jTable1);

		jLabel1.setText("\u5ba2\u6237\u59d3\u540d\uff1a");

		jLabel2.setText("VIP\u5361\u53f7\uff1a");

		UserName.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0,
				Color.black));
		UserName.setBackground(getBackground());
		UserName.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				UserNameActionPerformed(evt);
			}
		});

		VIPcode.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0,
				Color.black));
		VIPcode.setBackground(getBackground());
		VIPcode.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				VIPcodeActionPerformed(evt);
			}
		});

		org.jdesktop.layout.GroupLayout tab1Layout = new org.jdesktop.layout.GroupLayout(
				tab1);
		tab1.setLayout(tab1Layout);
		tab1Layout
				.setHorizontalGroup(tab1Layout
						.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING)
						.add(
								tab1Layout
										.createSequentialGroup()
										.add(110, 110, 110)
										.add(
												tab1Layout
														.createParallelGroup(
																org.jdesktop.layout.GroupLayout.LEADING)
														.add(jLabel2).add(
																jLabel1))
										.addPreferredGap(
												org.jdesktop.layout.LayoutStyle.RELATED)
										.add(
												tab1Layout
														.createParallelGroup(
																org.jdesktop.layout.GroupLayout.LEADING,
																false)
														.add(VIPcode)
														.add(
																UserName,
																org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																68,
																Short.MAX_VALUE))
										.add(78, 78, 78)
										.add(
												standardImage,
												org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
												205, Short.MAX_VALUE).add(136,
												136, 136)));
		tab1Layout
				.setVerticalGroup(tab1Layout
						.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING)
						.add(
								tab1Layout
										.createSequentialGroup()
										.add(
												tab1Layout
														.createParallelGroup(
																org.jdesktop.layout.GroupLayout.LEADING)
														.add(
																tab1Layout
																		.createSequentialGroup()
																		.add(
																				37,
																				37,
																				37)
																		.add(
																				tab1Layout
																						.createParallelGroup(
																								org.jdesktop.layout.GroupLayout.TRAILING)
																						.add(
																								jLabel1)
																						.add(
																								UserName,
																								org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																								org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																								org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
																		.add(
																				68,
																				68,
																				68)
																		.add(
																				tab1Layout
																						.createParallelGroup(
																								org.jdesktop.layout.GroupLayout.TRAILING)
																						.add(
																								jLabel2)
																						.add(
																								VIPcode,
																								org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																								org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																								org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
														.add(
																tab1Layout
																		.createSequentialGroup()
																		.add(
																				29,
																				29,
																				29)
																		.add(
																				standardImage,
																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																				185,
																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
										.addContainerGap(36, Short.MAX_VALUE)));

		jTabbedPane1.addTab("\u57fa\u672c\u8d44\u6599", tab1);

		serviceHistory.setModel(new javax.swing.table.DefaultTableModel(
				new Object[][] { { null, null, null }, { null, null, null },
						{ null, null, null }, { null, null, null },
						{ null, null, null }, { null, null, null },
						{ null, null, null }, { null, null, null },
						{ null, null, null }, { null, null, null } },
				new String[] { "日期", "服务网点", "客服代表" }));
		jScrollPane2.setViewportView(serviceHistory);

		org.jdesktop.layout.GroupLayout jPanel7Layout = new org.jdesktop.layout.GroupLayout(
				jPanel7);
		jPanel7.setLayout(jPanel7Layout);
		jPanel7Layout.setHorizontalGroup(jPanel7Layout.createParallelGroup(
				org.jdesktop.layout.GroupLayout.LEADING).add(jScrollPane2,
				org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 661,
				Short.MAX_VALUE));
		jPanel7Layout.setVerticalGroup(jPanel7Layout.createParallelGroup(
				org.jdesktop.layout.GroupLayout.LEADING).add(jScrollPane2,
				org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 250,
				Short.MAX_VALUE));

		jTabbedPane1.addTab("\u670d\u52a1\u8bb0\u5f55", jPanel7);

		jLabel3.setText("\u6027\u522b\uff1a");

		jLabel4.setText("\u5e74\u9f84\uff1a");

		jLabel5.setText("\u8eab\u4efd\u8bc1\u53f7\u7801\uff1a");

		jLabel6.setText("\u94f6\u884c\u5361\u53f7\uff1a");

		sex.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.black));
		sex.setBackground(getBackground());

		age.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.black));
		age.setBackground(getBackground());

		bankCode.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0,
				Color.black));
		bankCode.setBackground(getBackground());

		uid.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.black));
		uid.setBackground(getBackground());

		org.jdesktop.layout.GroupLayout tab2Layout = new org.jdesktop.layout.GroupLayout(
				tab2);
		tab2.setLayout(tab2Layout);
		tab2Layout.setHorizontalGroup(tab2Layout.createParallelGroup(
				org.jdesktop.layout.GroupLayout.LEADING).add(
				tab2Layout.createSequentialGroup().add(56, 56, 56).add(
						tab2Layout.createParallelGroup(
								org.jdesktop.layout.GroupLayout.TRAILING).add(
								jLabel4).add(jLabel3)).addPreferredGap(
						org.jdesktop.layout.LayoutStyle.RELATED).add(
						tab2Layout.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING).add(
								age,
								org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
								67, Short.MAX_VALUE).add(sex,
								org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
								67, Short.MAX_VALUE)).add(87, 87, 87).add(
						tab2Layout.createParallelGroup(
								org.jdesktop.layout.GroupLayout.TRAILING).add(
								jLabel5).add(jLabel6)).addPreferredGap(
						org.jdesktop.layout.LayoutStyle.RELATED).add(
						tab2Layout.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING).add(
								uid,
								org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
								66, Short.MAX_VALUE).add(bankCode,
								org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
								66, Short.MAX_VALUE)).add(269, 269, 269)));
		tab2Layout
				.setVerticalGroup(tab2Layout
						.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING)
						.add(
								tab2Layout
										.createSequentialGroup()
										.add(51, 51, 51)
										.add(
												tab2Layout
														.createParallelGroup(
																org.jdesktop.layout.GroupLayout.BASELINE)
														.add(jLabel3)
														.add(jLabel5)
														.add(
																sex,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
														.add(
																uid,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
										.addPreferredGap(
												org.jdesktop.layout.LayoutStyle.RELATED,
												85, Short.MAX_VALUE)
										.add(
												tab2Layout
														.createParallelGroup(
																org.jdesktop.layout.GroupLayout.BASELINE)
														.add(jLabel4)
														.add(jLabel6)
														.add(
																age,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
														.add(
																bankCode,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
										.add(74, 74, 74)));

		jTabbedPane1.addTab("\u4e2a\u4eba\u8d44\u6599", tab2);

		org.jdesktop.layout.GroupLayout tab3Layout = new org.jdesktop.layout.GroupLayout(
				tab3);
		tab3.setLayout(tab3Layout);
		tab3Layout.setHorizontalGroup(tab3Layout.createParallelGroup(
				org.jdesktop.layout.GroupLayout.LEADING).add(0, 661,
				Short.MAX_VALUE));
		tab3Layout.setVerticalGroup(tab3Layout.createParallelGroup(
				org.jdesktop.layout.GroupLayout.LEADING).add(0, 250,
				Short.MAX_VALUE));

		jTabbedPane1.addTab("\u8d27\u5e01\u79cd\u7c7b", tab3);

		jLabel7.setText("VIP\u7ea7\u522b\uff1a");

		jLabel8.setText("\u98ce\u9669\u7b49\u7ea7\uff1a");

		VIPlevel.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0,
				Color.black));
		VIPlevel.setBackground(getBackground());

		riskStage.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0,
				Color.black));
		riskStage.setBackground(getBackground());

		org.jdesktop.layout.GroupLayout tab4Layout = new org.jdesktop.layout.GroupLayout(
				tab4);
		tab4.setLayout(tab4Layout);
		tab4Layout.setHorizontalGroup(tab4Layout.createParallelGroup(
				org.jdesktop.layout.GroupLayout.LEADING).add(
				tab4Layout.createSequentialGroup().add(76, 76, 76).add(
						tab4Layout.createParallelGroup(
								org.jdesktop.layout.GroupLayout.TRAILING).add(
								jLabel8).add(jLabel7)).addPreferredGap(
						org.jdesktop.layout.LayoutStyle.UNRELATED).add(
						tab4Layout.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING).add(
								riskStage,
								org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
								65, Short.MAX_VALUE).add(VIPlevel,
								org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
								65, Short.MAX_VALUE)).add(450, 450, 450)));
		tab4Layout
				.setVerticalGroup(tab4Layout
						.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING)
						.add(
								tab4Layout
										.createSequentialGroup()
										.add(56, 56, 56)
										.add(
												tab4Layout
														.createParallelGroup(
																org.jdesktop.layout.GroupLayout.BASELINE)
														.add(jLabel7)
														.add(
																VIPlevel,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
										.add(77, 77, 77)
										.add(
												tab4Layout
														.createParallelGroup(
																org.jdesktop.layout.GroupLayout.BASELINE)
														.add(jLabel8)
														.add(
																riskStage,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
										.addContainerGap(77, Short.MAX_VALUE)));

		jTabbedPane1.addTab("\u98ce\u9669\u7b49\u7ea7", tab4);

		fileMenu.setText("File");

		openMenuItem.setText("Open");
		fileMenu.add(openMenuItem);

		saveMenuItem.setText("Save");
		fileMenu.add(saveMenuItem);

		saveAsMenuItem.setText("Save As ...");
		fileMenu.add(saveAsMenuItem);

		exitMenuItem.setText("Exit");
		exitMenuItem.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				exitMenuItemActionPerformed(evt);
			}
		});
		fileMenu.add(exitMenuItem);

		menuBar.add(fileMenu);

		editMenu.setText("Edit");

		cutMenuItem.setText("Cut");
		editMenu.add(cutMenuItem);

		copyMenuItem.setText("Copy");
		editMenu.add(copyMenuItem);

		pasteMenuItem.setText("Paste");
		editMenu.add(pasteMenuItem);

		deleteMenuItem.setText("Delete");
		editMenu.add(deleteMenuItem);

		menuBar.add(editMenu);

		helpMenu.setText("Help");

		contentsMenuItem.setText("Contents");
		helpMenu.add(contentsMenuItem);

		aboutMenuItem.setText("About");
		helpMenu.add(aboutMenuItem);

		menuBar.add(helpMenu);

		fileMenu1.setText("File");

		openMenuItem1.setText("Open");
		fileMenu1.add(openMenuItem1);

		saveMenuItem1.setText("Save");
		fileMenu1.add(saveMenuItem1);

		saveAsMenuItem1.setText("Save As ...");
		fileMenu1.add(saveAsMenuItem1);

		exitMenuItem1.setText("Exit");
		exitMenuItem1.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				exitMenuItemActionPerformed(evt);
			}
		});
		fileMenu1.add(exitMenuItem1);

		menuBar1.add(fileMenu1);

		editMenu1.setText("Edit");

		cutMenuItem1.setText("Cut");
		editMenu1.add(cutMenuItem1);

		copyMenuItem1.setText("Copy");
		editMenu1.add(copyMenuItem1);

		pasteMenuItem1.setText("Paste");
		editMenu1.add(pasteMenuItem1);

		deleteMenuItem1.setText("Delete");
		editMenu1.add(deleteMenuItem1);

		menuBar1.add(editMenu1);

		helpMenu1.setText("Help");

		contentsMenuItem1.setText("Contents");
		helpMenu1.add(contentsMenuItem1);

		aboutMenuItem1.setText("About");
		helpMenu1.add(aboutMenuItem1);

		menuBar1.add(helpMenu1);

		fileMenu2.setText("File");

		openMenuItem2.setText("Open");
		fileMenu2.add(openMenuItem2);

		saveMenuItem2.setText("Save");
		fileMenu2.add(saveMenuItem2);

		saveAsMenuItem2.setText("Save As ...");
		fileMenu2.add(saveAsMenuItem2);

		exitMenuItem2.setText("Exit");
		exitMenuItem2.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				exitMenuItemActionPerformed(evt);
			}
		});
		fileMenu2.add(exitMenuItem2);

		menuBar2.add(fileMenu2);

		editMenu2.setText("Edit");

		cutMenuItem2.setText("Cut");
		editMenu2.add(cutMenuItem2);

		copyMenuItem2.setText("Copy");
		editMenu2.add(copyMenuItem2);

		pasteMenuItem2.setText("Paste");
		editMenu2.add(pasteMenuItem2);

		deleteMenuItem2.setText("Delete");
		editMenu2.add(deleteMenuItem2);

		menuBar2.add(editMenu2);

		helpMenu2.setText("Help");

		contentsMenuItem2.setText("Contents");
		helpMenu2.add(contentsMenuItem2);

		aboutMenuItem2.setText("About");
		helpMenu2.add(aboutMenuItem2);

		menuBar2.add(helpMenu2);

		jLabel10.setText("jLabel10");

		jLabel11.setText("jLabel11");

		jLabel12.setText("jLabel12");

		jLabel13.setText("jLabel13");

		jLabel14.setText("jLabel14");

		jLabel15.setText("jLabel15");

		jLabel16.setText("jLabel16");

		jLabel17.setText("jLabel17");

		jLabel18.setText("jLabel18");

		Lock.setText("\u89e3\u9501");
		Lock.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				LockActionPerformed(evt);
			}
		});

		waiterInfo.setText("\u63a5\u5f85\uff1a");

		arrangeWaiter.setText("\u5b89\u6392\u63a5\u5f85");
		arrangeWaiter.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				arrangeWaiterActionPerformed(evt);
			}
		});
		arrangeWaiter.addChangeListener(new javax.swing.event.ChangeListener() {
			public void stateChanged(javax.swing.event.ChangeEvent evt) {
				arrangeWaiterStateChanged(evt);
			}
		});

		fileMenu3.setText("\u64cd\u4f5c");

		newUser.setText("\u65b0\u5efa\u7528\u6237");
		newUser.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				newUserActionPerformed(evt);
			}
		});
		fileMenu3.add(newUser);

		reNew.setText("\u91cd\u53d1\u5361");
		fileMenu3.add(reNew);

		exit.setText("\u9000\u51fa");
		exit.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				exitMenuItemActionPerformed(evt);
			}
		});
		fileMenu3.add(exit);

		menuBar3.add(fileMenu3);

		editMenu3.setText("\u67e5\u627e");

		searchVip.setText("\u7ba1\u7406\u5ba2\u6237\u8d26\u6237");
		searchVip.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				searchVipActionPerformed(evt);
			}
		});
		editMenu3.add(searchVip);

		copyMenuItemStuffManager
				.setText("\u7ba1\u7406\u5458\u5de5\u8d26\u6237");
		copyMenuItemStuffManager
				.addActionListener(new java.awt.event.ActionListener() {
					public void actionPerformed(java.awt.event.ActionEvent evt) {
						copyMenuItemStuffManagerActionPerformed(evt);
					}
				});
		editMenu3.add(copyMenuItemStuffManager);

		pasteMenuItem3.setText("Paste");
		editMenu3.add(pasteMenuItem3);

		deleteMenuItem3.setText("Delete");
		editMenu3.add(deleteMenuItem3);

		menuBar3.add(editMenu3);

		helpMenu3.setText("\u5e2e\u52a9");

		contentsMenuItem3.setText("\u5185\u5bb9");
		helpMenu3.add(contentsMenuItem3);

		about.setText("\u5173\u4e8e");
		helpMenu3.add(about);

		menuBar3.add(helpMenu3);

		jTextField1.setText("            \u76f8\u7247");

		jLabelTimeIn.setText("\u8fdb\u5165\u65f6\u95f4:");

		fileMenu4.setText("\u64cd\u4f5c");

		newUser1.setText("\u65b0\u5efa\u7528\u6237");
		newUser1.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				newUserActionPerformed(evt);
			}
		});
		fileMenu4.add(newUser1);

		reNew1.setText("\u91cd\u53d1\u5361");
		fileMenu4.add(reNew1);

		exit1.setText("\u9000\u51fa");
		exit1.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				exitMenuItemActionPerformed(evt);
			}
		});
		fileMenu4.add(exit1);

		menuBar4.add(fileMenu4);

		editMenu4.setText("\u67e5\u627e");

		searchVip1.setText("\u7ba1\u7406\u5ba2\u6237\u8d26\u6237");
		searchVip1.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				searchVipActionPerformed(evt);
			}
		});
		editMenu4.add(searchVip1);

		copyMenuItemStuffManager1
				.setText("\u7ba1\u7406\u5458\u5de5\u8d26\u6237");
		copyMenuItemStuffManager1
				.addActionListener(new java.awt.event.ActionListener() {
					public void actionPerformed(java.awt.event.ActionEvent evt) {
						copyMenuItemStuffManagerActionPerformed(evt);
					}
				});
		editMenu4.add(copyMenuItemStuffManager1);

		pasteMenuItem4.setText("Paste");
		editMenu4.add(pasteMenuItem4);

		deleteMenuItem4.setText("Delete");
		editMenu4.add(deleteMenuItem4);

		menuBar4.add(editMenu4);

		helpMenu4.setText("\u5e2e\u52a9");

		contentsMenuItem4.setText("\u5185\u5bb9");
		helpMenu4.add(contentsMenuItem4);

		about1.setText("\u5173\u4e8e");
		helpMenu4.add(about1);

		menuBar4.add(helpMenu4);

		org.jdesktop.layout.GroupLayout liveImageLayout = new org.jdesktop.layout.GroupLayout(
				liveImage);
		liveImage.setLayout(liveImageLayout);
		liveImageLayout.setHorizontalGroup(liveImageLayout.createParallelGroup(
				org.jdesktop.layout.GroupLayout.LEADING).add(0, 528,
				Short.MAX_VALUE));
		liveImageLayout.setVerticalGroup(liveImageLayout.createParallelGroup(
				org.jdesktop.layout.GroupLayout.LEADING).add(0, 343,
				Short.MAX_VALUE));

		fileMenu5.setText("\u64cd\u4f5c");

		newUser2.setText("\u65b0\u5efa\u7528\u6237");
		newUser2.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				newUserActionPerformed(evt);
			}
		});
		fileMenu5.add(newUser2);

		reNew2.setText("\u91cd\u53d1\u5361");
		reNew2.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				reNew2ActionPerformed(evt);
			}
		});
		fileMenu5.add(reNew2);

		exit2.setText("\u9000\u51fa");
		exit2.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				exitMenuItemActionPerformed(evt);
			}
		});
		fileMenu5.add(exit2);

		menuBar5.add(fileMenu5);

		editMenu5.setText("\u67e5\u627e");

		searchVip2.setText("\u7ba1\u7406\u5ba2\u6237\u8d26\u6237");
		searchVip2.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				searchVipActionPerformed(evt);
			}
		});
		editMenu5.add(searchVip2);

		copyMenuItemStuffManager2
				.setText("\u7ba1\u7406\u5458\u5de5\u8d26\u6237");
		copyMenuItemStuffManager2
				.addActionListener(new java.awt.event.ActionListener() {
					public void actionPerformed(java.awt.event.ActionEvent evt) {
						copyMenuItemStuffManagerActionPerformed(evt);
					}
				});
		editMenu5.add(copyMenuItemStuffManager2);

		pasteMenuItem5.setText("Paste");
		editMenu5.add(pasteMenuItem5);

		deleteMenuItem5.setText("Delete");
		editMenu5.add(deleteMenuItem5);

		menuBar5.add(editMenu5);

		helpMenu5.setText("\u5e2e\u52a9");

		contentsMenuItem5.setText("\u5185\u5bb9");
		helpMenu5.add(contentsMenuItem5);

		about2.setText("\u5173\u4e8e");
		about2.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				about2ActionPerformed(evt);
			}
		});
		helpMenu5.add(about2);

		menuBar5.add(helpMenu5);

		setJMenuBar(menuBar5);

		org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
				getContentPane());
		getContentPane().setLayout(layout);
		layout
				.setHorizontalGroup(layout
						.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING)
						.add(
								layout
										.createSequentialGroup()
										.add(17, 17, 17)
										.add(
												jScrollPane1,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
												289,
												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
										.add(
												layout
														.createParallelGroup(
																org.jdesktop.layout.GroupLayout.LEADING)
														.add(
																layout
																		.createParallelGroup(
																				org.jdesktop.layout.GroupLayout.LEADING)
																		.add(
																				layout
																						.createParallelGroup(
																								org.jdesktop.layout.GroupLayout.LEADING)
																						.add(
																								layout
																										.createSequentialGroup()
																										.add(
																												18,
																												18,
																												18)
																										.add(
																												jTabbedPane1,
																												org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																												666,
																												Short.MAX_VALUE)
																										.addContainerGap())
																						.add(
																								layout
																										.createSequentialGroup()
																										.add(
																												163,
																												163,
																												163)
																										.add(
																												jTextField1,
																												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																												199,
																												org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
																										.addContainerGap())
																						.add(
																								layout
																										.createSequentialGroup()
																										.add(
																												layout
																														.createParallelGroup(
																																org.jdesktop.layout.GroupLayout.LEADING)
																														.add(
																																layout
																																		.createSequentialGroup()
																																		.add(
																																				175,
																																				175,
																																				175)
																																		.add(
																																				arrangeWaiter))
																														.add(
																																layout
																																		.createSequentialGroup()
																																		.add(
																																				58,
																																				58,
																																				58)
																																		.add(
																																				jLabelTimeIn,
																																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																																				147,
																																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
																										.add(
																												36,
																												36,
																												36)
																										.add(
																												layout
																														.createParallelGroup(
																																org.jdesktop.layout.GroupLayout.LEADING)
																														.add(
																																waiterInfo,
																																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																																176,
																																org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
																														.add(
																																Lock))
																										.add(
																												159,
																												159,
																												159)))
																		.add(
																				layout
																						.createSequentialGroup()
																						.addPreferredGap(
																								org.jdesktop.layout.LayoutStyle.RELATED)
																						.add(
																								jSeparator1,
																								org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																								611,
																								org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
																						.addContainerGap()))
														.add(
																layout
																		.createSequentialGroup()
																		.add(
																				70,
																				70,
																				70)
																		.add(
																				liveImage,
																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																				org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
																		.addContainerGap()))));
		layout
				.setVerticalGroup(layout
						.createParallelGroup(
								org.jdesktop.layout.GroupLayout.LEADING)
						.add(
								layout
										.createSequentialGroup()
										.addContainerGap()
										.add(
												layout
														.createParallelGroup(
																org.jdesktop.layout.GroupLayout.TRAILING)
														.add(
																jScrollPane1,
																org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																853,
																Short.MAX_VALUE)
														.add(
																org.jdesktop.layout.GroupLayout.LEADING,
																layout
																		.createSequentialGroup()
																		.add(
																				9,
																				9,
																				9)
																		.add(
																				liveImage,
																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																				org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
																		.add(
																				44,
																				44,
																				44)
																		.add(
																				jSeparator1,
																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																				org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
																		.addPreferredGap(
																				org.jdesktop.layout.LayoutStyle.RELATED)
																		.add(
																				jTextField1,
																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																				org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
																		.addPreferredGap(
																				org.jdesktop.layout.LayoutStyle.RELATED)
																		.add(
																				layout
																						.createParallelGroup(
																								org.jdesktop.layout.GroupLayout.TRAILING)
																						.add(
																								waiterInfo,
																								org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																								23,
																								org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
																						.add(
																								jLabelTimeIn,
																								org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																								19,
																								org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
																		.add(
																				18,
																				18,
																				18)
																		.add(
																				layout
																						.createParallelGroup(
																								org.jdesktop.layout.GroupLayout.BASELINE)
																						.add(
																								arrangeWaiter)
																						.add(
																								Lock))
																		.add(
																				18,
																				18,
																				18)
																		.add(
																				jTabbedPane1,
																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
																				org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
																				org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
										.addContainerGap(
												org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
												Short.MAX_VALUE)));

		pack();
	}// </editor-fold>
	//GEN-END:initComponents

	private void LockActionPerformed(java.awt.event.ActionEvent evt) {
		boolean lock = MainClass.getSingleton().isLock();
		if (lock) {
			MainClass.getSingleton().setLock(false);
			getLock().setText("未锁定");
		} else {
			MainClass.getSingleton().setLock(true);
			getLock().setText("已锁定");
		}
	}

	private void about2ActionPerformed(java.awt.event.ActionEvent evt) {
		JOptionPane.showOptionDialog(getThis(), "欢迎使用尚品软件\n"
				+ "简介:\n   Rfid读写器 \n" + "该系统应用了最新的Rfid射频识别技术\n"
				+ "适用于不同的环境之下，谢谢!\n\n" +

				"http://www.shangpintechnology.com", "关于尚品",
				JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE,
				null, null, null);

	}

	private void jTable1MouseClicked(java.awt.event.MouseEvent evt) {

		MainClass.getSingleton().setLock(true);
		getLock().setText("已锁定");

	}

	private void reNew2ActionPerformed(java.awt.event.ActionEvent evt) {
		MainClass.getSingleton().handOutCard=true;
		ConfirmHandOutCard cinfo = new ConfirmHandOutCard(getThis(), true);
		 cinfo.getCancel().addActionListener(new ActionListener() {

			public void actionPerformed(ActionEvent arg0) {
				MainClass.getSingleton().getCinfo().dispose();
				MainClass.getSingleton().handOutCard=false;
						
			}

		});
		cinfo.getConfirm().addActionListener(new ActionListener() {

			public void actionPerformed(ActionEvent arg0) {
				ConfirmHandOutCard cinfo = MainClass.getSingleton().getCinfo();
				if (MainClass.getSingleton().getDataModel().updateVipCode(
						cinfo.getVipCode(), cinfo.getRfidCode())) {
					JOptionPane.showConfirmDialog(getThis(), "成功", "信息",
							JOptionPane.DEFAULT_OPTION,
							JOptionPane.INFORMATION_MESSAGE);
				} else {
					JOptionPane.showConfirmDialog(getThis(), "失败", "信息",
							JOptionPane.DEFAULT_OPTION,
							JOptionPane.WARNING_MESSAGE);
				}
				MainClass.getSingleton().handOutCard=true;
				
				cinfo.dispose();
			}

		});
	}

	//GEN-END:initComponents

	private void searchVipActionPerformed(java.awt.event.ActionEvent evt) {
		 JOptionPane.showConfirmDialog(null, "in serchvipc actionperform");
		String arg = new String("请输入姓名：");
		String name = JOptionPane.showInputDialog(arg);
		String[][] accountInfo = MainClass.getSingleton().getDataModel()
				.searchVip(name);
		if (accountInfo == null) {
			JOptionPane.showMessageDialog(this, "未找到满足条件的结果集");
			dispose();
		}
		for (int i = 0; i < accountInfo.length; i++) {
			for (int j = 0; j < accountInfo[i].length; j++) {
				System.out.println("i=" + i + "j=" + j + ":"
						+ accountInfo[i][j]);
			}
		}

		SearchVip sv = new SearchVip(getThis(), false);
		MainClass.getSingleton().setSv(sv);
		TableModel model = new DefaultTableModel(accountInfo, new String[] {
				"卡号", "姓名", "等级", "性别", "年龄", "风险", "银行帐号", "证件类别", "证件号码" }) {

		};
		sv.getVipInfoTable().setModel(model);
		model.addTableModelListener(new TableModelListener() {

			@Override
			public void tableChanged(TableModelEvent evt) {
				if (evt.getType() == evt.UPDATE) {
					TableModel model = (DefaultTableModel) evt.getSource();
					int row = evt.getFirstRow();
					String id = (String) model.getValueAt(row, 0);
					if (id != null && id != "") {
						DAO dao = new DAO();
						int column = evt.getColumn();
						String value = (String) model.getValueAt(row, column);
						switch (column) {
						case 0:
							return;
						case 1:
							dao.updateAccountName(id, value);
							return;
						case 2:
							dao.updateAccountLevel(id, value);
							return;
						case 3:
							dao.updateAccountSex(id, value);
							return;
						case 4:
							dao.updateAccountAge(id, value);
							return;
						case 5:
							dao.updateAccountRisk(id, value);
							return;
						case 6:
							dao.updateAccountBankCode(id, value);
							return;
						case 7:
							dao.updateAccountPassType(id, value);
							return;
						case 8:
							dao.updateAccountPassCode(id, value);
							return;
						}
					}
				}
			}

		});

		sv.getHandOutCard().addActionListener(new ActionListener() {

			public void actionPerformed(ActionEvent e) {
				JOptionPane.showConfirmDialog(null, "in HandOutCard");
				String id = MainClass.getSingleton().getSv().getVipInfoTable()
						.getModel().getValueAt(
								MainClass.getSingleton().getSv()
										.getVipInfoTable().getSelectedRow(), 0)
						.toString();
				if (null == MainClass.getSingleton().getCinfo()) {
					MainClass.getSingleton().setCinfo(
							new ConfirmHandOutCard(getThis(), false));
				}
				MainClass.getSingleton().getCinfo().getVipCode().setText(id);
				MainClass.getSingleton().getCinfo().getRfidCode()
						.setText(
								MainClass.getSingleton().getDataModel()
										.getRfidCode(id));
				MainClass.getSingleton().getCinfo().setVisible(true);
			}

		});
		sv.setVisible(true);
	}

	private void copyMenuItemStuffManagerActionPerformed(
			java.awt.event.ActionEvent evt) {
		StuffManager sf = new StuffManager();
				sf.setVisible(true);
	}

	private void arrangeWaiterActionPerformed(java.awt.event.ActionEvent evt) {

		ArrangeWaiter aw = new ArrangeWaiter(this, rootPaneCheckingEnabled);
		aw.setVisible(true);
	}

	private void newUserActionPerformed(java.awt.event.ActionEvent evt) {
		MainClass.getSingleton().newVip = true;
		ConfirmUserInfo uinfo = MainClass.getSingleton().getUinfo();
		uinfo.setVisible(true);
		if (null == uinfo) {
			System.out.println("1237");
			uinfo = new ConfirmUserInfo(getThis(),
					rootPaneCheckingEnabled);
			//uinfo.setCamText(MainFrame.getMainFrame().getNorthPanel());
			//System.out.println("1238===="+MainFrame.getMainFrame().getNorthPanel());
			uinfo = new ConfirmUserInfo(getThis(), rootPaneCheckingEnabled);
			MainClass.getSingleton().setUinfo(uinfo);
		}

		MainClass.getSingleton().handOutCard = true;
		uinfo.getCancel().addActionListener(new ActionListener() {

			public void actionPerformed(ActionEvent arg0) {
				System.out.println("1235");
				MainClass.getSingleton().getUinfo().setVisible(false);
				MainClass.getSingleton().handOutCard = false;
			}
		});
		uinfo.getConfirm().addActionListener(new ActionListener() {

			public void actionPerformed(ActionEvent arg0) {
				ConfirmUserInfo uinfo = MainClass.getSingleton().getUinfo();
				if (MainClass.getSingleton().getDataModel().updateAccountInfo(
						uinfo.getVipCard().getText(),
						uinfo.getUserName().getText(),
						uinfo.getAge().getText(),
						uinfo.getBankCard().getText(),
						uinfo.getSex().getText(),
						uinfo.getRiskStage().getText(),
						uinfo.getPassType().getText(),
						uinfo.getPassCode().getText())) {
					JOptionPane.showConfirmDialog(getThis(), "成功", "信息",
							JOptionPane.DEFAULT_OPTION,
							JOptionPane.INFORMATION_MESSAGE);
				} else {
					JOptionPane.showConfirmDialog(getThis(), "失败", "信息",
							JOptionPane.DEFAULT_OPTION,
							JOptionPane.WARNING_MESSAGE);
				}
				//uinfo.getCamText().add(MainFrame.getMainFrame().getNorthPanel());
				uinfo.setVisible(false);
				uinfo = null; 
				MainClass.getSingleton().newVip=false;
			}
		});
		 
	}

	public javax.swing.JTextField getVIPlevel() {
		return VIPlevel;
	}

	public void setVIPlevel(javax.swing.JTextField plevel) {
		VIPlevel = plevel;
	}

	public javax.swing.JTextField getAge() {
		return age;
	}

	public void setAge(javax.swing.JTextField age) {
		this.age = age;
	}

	public javax.swing.JTextField getBankCode() {
		return bankCode;
	}

	public void setBankCode(javax.swing.JTextField bankCode) {
		this.bankCode = bankCode;
	}

	public javax.swing.JTextField getRiskStage() {
		return riskStage;
	}

	public void setRiskStage(javax.swing.JTextField riskStage) {
		this.riskStage = riskStage;
	}

	public javax.swing.JTextField getSex() {
		return sex;
	}

	public void setSex(javax.swing.JTextField sex) {
		this.sex = sex;
	}

	public javax.swing.JTextField getUid() {
		return uid;
	}

	public void setUid(javax.swing.JTextField uid) {
		this.uid = uid;
	}

	public javax.swing.JTable getServiceHistory() {
		return serviceHistory;
	}

	public void setServiceHistory(javax.swing.JTable serviceHistory) {
		this.serviceHistory = serviceHistory;
	}

	private void UserNameActionPerformed(java.awt.event.ActionEvent evt) {
		// TODO add your handling code here:
	}

	private void VIPcodeActionPerformed(java.awt.event.ActionEvent evt) {
		// TODO add your handling code here:
	}

	public javax.swing.JTextField getJTextField1() {
		return jTextField1;
	}

	public void setJTextField1(javax.swing.JTextField textField1) {
		jTextField1 = textField1;
	}

	public javax.swing.JTable getJTable1() {
		return jTable1;
	}

	public void setJTable1(javax.swing.JTable table1) {
		jTable1 = table1;
	}

	private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitMenuItemActionPerformed
		System.exit(0);
	}//GEN-LAST:event_exitMenuItemActionPerformed

	/**
	 * @param args the command line arguments
	 */
	public static void main(String args[]) {
		java.awt.EventQueue.invokeLater(new Runnable() {
			public void run() {
				new FirstView2().setVisible(true);
			}
		});
	}

	void arrangeWaiterStateChanged(ChangeEvent evt) {

	}

	//GEN-BEGIN:variables
	// Variables declaration - do not modify
	private javax.swing.JButton Lock;
	private static javax.swing.JTextField UserName;
	private javax.swing.JTextField VIPcode;
	private javax.swing.JTextField VIPlevel;
	private javax.swing.JMenuItem about;
	private javax.swing.JMenuItem about1;
	private javax.swing.JMenuItem about2;
	private javax.swing.JMenuItem aboutMenuItem;
	private javax.swing.JMenuItem aboutMenuItem1;
	private javax.swing.JMenuItem aboutMenuItem2;
	private javax.swing.JTextField age;
	private javax.swing.JToggleButton arrangeWaiter;
	private javax.swing.JTextField bankCode;
	private javax.swing.JMenuItem contentsMenuItem;
	private javax.swing.JMenuItem contentsMenuItem1;
	private javax.swing.JMenuItem contentsMenuItem2;
	private javax.swing.JMenuItem contentsMenuItem3;
	private javax.swing.JMenuItem contentsMenuItem4;
	private javax.swing.JMenuItem contentsMenuItem5;
	private javax.swing.JMenuItem copyMenuItem;
	private javax.swing.JMenuItem copyMenuItem1;
	private javax.swing.JMenuItem copyMenuItem2;
	private javax.swing.JMenuItem copyMenuItemStuffManager;
	private javax.swing.JMenuItem copyMenuItemStuffManager1;
	private javax.swing.JMenuItem copyMenuItemStuffManager2;
	private javax.swing.JMenuItem cutMenuItem;
	private javax.swing.JMenuItem cutMenuItem1;
	private javax.swing.JMenuItem cutMenuItem2;
	private javax.swing.JMenuItem deleteMenuItem;
	private javax.swing.JMenuItem deleteMenuItem1;
	private javax.swing.JMenuItem deleteMenuItem2;
	private javax.swing.JMenuItem deleteMenuItem3;
	private javax.swing.JMenuItem deleteMenuItem4;
	private javax.swing.JMenuItem deleteMenuItem5;
	private javax.swing.JMenu editMenu;
	private javax.swing.JMenu editMenu1;
	private javax.swing.JMenu editMenu2;
	private javax.swing.JMenu editMenu3;
	private javax.swing.JMenu editMenu4;
	private javax.swing.JMenu editMenu5;
	private javax.swing.JMenuItem exit;
	private javax.swing.JMenuItem exit1;
	private javax.swing.JMenuItem exit2;
	private javax.swing.JMenuItem exitMenuItem;
	private javax.swing.JMenuItem exitMenuItem1;
	private javax.swing.JMenuItem exitMenuItem2;
	private javax.swing.JMenu fileMenu;
	private javax.swing.JMenu fileMenu1;
	private javax.swing.JMenu fileMenu2;
	private javax.swing.JMenu fileMenu3;
	private javax.swing.JMenu fileMenu4;
	private javax.swing.JMenu fileMenu5;
	private javax.swing.JMenu helpMenu;
	private javax.swing.JMenu helpMenu1;
	private javax.swing.JMenu helpMenu2;
	private javax.swing.JMenu helpMenu3;
	private javax.swing.JMenu helpMenu4;
	private javax.swing.JMenu helpMenu5;
	private javax.swing.JLabel jLabel1;
	private javax.swing.JLabel jLabel10;
	private javax.swing.JLabel jLabel11;
	private javax.swing.JLabel jLabel12;
	private javax.swing.JLabel jLabel13;
	private javax.swing.JLabel jLabel14;
	private javax.swing.JLabel jLabel15;
	private javax.swing.JLabel jLabel16;
	private javax.swing.JLabel jLabel17;
	private javax.swing.JLabel jLabel18;
	private javax.swing.JLabel jLabel2;
	private javax.swing.JLabel jLabel3;
	private javax.swing.JLabel jLabel4;
	private javax.swing.JLabel jLabel5;
	private javax.swing.JLabel jLabel6;
	private javax.swing.JLabel jLabel7;
	private javax.swing.JLabel jLabel8;
	private javax.swing.JLabel jLabelTimeIn;
	private javax.swing.JPanel jPanel7;
	private javax.swing.JScrollPane jScrollPane1;
	private javax.swing.JScrollPane jScrollPane2;
	private javax.swing.JSeparator jSeparator1;
	private javax.swing.JTabbedPane jTabbedPane1;
	private javax.swing.JTable jTable1;
	private javax.swing.JTextField jTextField1;
	private javax.swing.JPanel liveImage;
	private javax.swing.JMenuBar menuBar;
	private javax.swing.JMenuBar menuBar1;
	private javax.swing.JMenuBar menuBar2;
	private javax.swing.JMenuBar menuBar3;
	private javax.swing.JMenuBar menuBar4;
	private javax.swing.JMenuBar menuBar5;
	private javax.swing.JMenuItem newUser;
	private javax.swing.JMenuItem newUser1;
	private javax.swing.JMenuItem newUser2;
	private javax.swing.JMenuItem openMenuItem;
	private javax.swing.JMenuItem openMenuItem1;
	private javax.swing.JMenuItem openMenuItem2;
	private javax.swing.JMenuItem pasteMenuItem;
	private javax.swing.JMenuItem pasteMenuItem1;
	private javax.swing.JMenuItem pasteMenuItem2;
	private javax.swing.JMenuItem pasteMenuItem3;
	private javax.swing.JMenuItem pasteMenuItem4;
	private javax.swing.JMenuItem pasteMenuItem5;
	private javax.swing.JMenuItem reNew;
	private javax.swing.JMenuItem reNew1;
	private javax.swing.JMenuItem reNew2;
	private javax.swing.JTextField riskStage;
	private javax.swing.JMenuItem saveAsMenuItem;
	private javax.swing.JMenuItem saveAsMenuItem1;
	private javax.swing.JMenuItem saveAsMenuItem2;
	private javax.swing.JMenuItem saveMenuItem;
	private javax.swing.JMenuItem saveMenuItem1;
	private javax.swing.JMenuItem saveMenuItem2;
	private javax.swing.JMenuItem searchVip;
	private javax.swing.JMenuItem searchVip1;
	private javax.swing.JMenuItem searchVip2;
	private javax.swing.JTable serviceHistory;
	private javax.swing.JTextField sex;
	private javax.swing.JLabel standardImage;
	private javax.swing.JPanel tab1;
	private javax.swing.JPanel tab2;
	private javax.swing.JPanel tab3;
	private javax.swing.JPanel tab4;
	private javax.swing.JTextField uid;
	private javax.swing.JLabel waiterInfo;

	// End of variables declaration//GEN-END:variables
	public javax.swing.JPanel getLiveImage() {
		return liveImage;
	}

	public javax.swing.JTextField getUserName() {
		return UserName;
	}

	public void setUserName(javax.swing.JTextField userName) {
		UserName = userName;
	}

	public javax.swing.JTextField getVIPcode() {
		return VIPcode;
	}

	public void setVIPcode(javax.swing.JTextField pcode) {
		VIPcode = pcode;
	}

	public void setLiveImage(javax.swing.JPanel liveImage) {
		this.liveImage = liveImage;
	}

	public javax.swing.JLabel getStandardImage() {
		return standardImage;
	}

	public void setStandardImage(javax.swing.JLabel standardImage) {
		this.standardImage = standardImage;
	}

}